package com.leadingsoft.pwxk.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.leadingsoft.pwxk.converter.CentralPointConverter;
import com.leadingsoft.pwxk.dto.CentralPointDto;
import com.leadingsoft.pwxk.model.CentralPoint;
import com.leadingsoft.pwxk.service.CentralPointService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 
 * @author ysh
 * @desc 获取四川各市中心点坐标
 */
@Api(description = "四川各市中心点坐标")
@RequestMapping("api/centralPoint")
@RestController
public class CentralPointController {

	@Autowired
	CentralPointService centralPointService;
	@Autowired
	CentralPointConverter centralPointConverter;

	@ApiOperation("获取四川各市中心点坐标信息")
	@GetMapping
	public List<CentralPointDto> get() {
		List<CentralPoint> list = centralPointService.get();
		return centralPointConverter.toDto(list);
	}

}
